<template>
  <div id="app">
    <choose-item v-for='(item,index) in list' :key="index" :item="item">
    </choose-item>
  </div>
</template>

<script>
  import axios from "axios"
  import chooseItem from "./components/choose"
export default {
  name: 'App',
  data(){
    return{
      list:[],
      obj:{}
    }
  },
  components:{
    chooseItem
  },
  created(){
  axios.get("/api/list").then((res)=>{
   if(res.data.code==1){
     this.list=res.data.data;
     this.list.forEach((item)=>{
       this.$set(this.obj,item.Subject,item[0].Type)
       
     })
     console.log(this.obj)
   }
  }).catch((erro)=>{
    console.log(erro)
  })
}

}

</script>

<style>
/* #app {
  font-family: 'Avenir', Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
  margin-top: 60px;
} */
@import "./assets/common.css"
</style>
